package com.chuang.bootplus.controller;


import com.chuang.bootplus.base.constant.Constant;
import com.chuang.bootplus.base.utils.ApiResponse;
import com.chuang.bootplus.po.TipsInfoPO;
import com.chuang.bootplus.service.TipsService;
import com.chuang.bootplus.vo.TipsInfoVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author ${author}
 * @since 2021-08-17
 */
@RestController
@RequestMapping("/tips")
@Api(tags = "小tips")
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
public class TipsController {
    final TipsService tipsService;
    @PostMapping("getTip")
    @ApiOperation("获取tip")
    public ApiResponse<TipsInfoVO> getTip(@RequestBody TipsInfoPO po){
        return tipsService.info(po);
    }
}

